<?php include_once('../layouts/header.php') ?>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',split:true,border:false">
        <div class="container">
            <form id="form-select"
             data-options="
                form:{
                    url:'/data/index.php?type=test',
                    id:'#form-select',
                },
             ">
                <fieldset><legend><code>下拉框 调用本地数据 select</code></legend></fieldset>
                <div class="form-box sm-form">
                    <div class="form-item row">
                        <?php 
                        $language = [
                            "ar"=>"Arabic",
                            "bg"=>"Bulgarian",
                            "ca"=>"Catalan",
                            "zh-cht"=>"ChineseTraditional",
                            "cs"=>"Czech",
                            "da"=>"Danish",
                            "nl"=>"Dutch",
                            "en"=>"English",
                            "et"=>"Estonian",
                            "fi"=>"Finnish",
                            "fr"=>"French",
                            "de"=>"German",
                            "el"=>"Greek",
                            "ht"=>"HaitianCreole",
                            "he"=>"Hebrew",
                            "hi"=>"Hindi",
                            "mww"=>"Hmong",
                            "hu"=>"Hungarian",
                            "id"=>"Indonesian",
                            "it"=>"Italian",
                            "ja"=>"Japanese",
                            "ko"=>"Korean",
                            "lv"=>"Latvian",
                            "lt"=>"Lithuanian",
                            "no"=>"Norwegian",
                            "fa"=>"Persian",
                            "pl"=>"Polish",
                            "pt"=>"Portuguese",
                            "ro"=>"Romanian",
                            "ru"=>"Russian",
                            "sk"=>"Slovak",
                            "sl"=>"Slovenian",
                            "es"=>"Spanish",
                            "sv"=>"Swedish",
                            "th"=>"Thai",
                            "tr"=>"Turkish",
                            "uk"=>"Ukrainian",
                            "vi"=>"Vietnamese",
                        ];
                        ?>
                        <div class="form-input input-group groups col-6">
                            <div class="group-text">下拉单选</div>
                            <select class="group-input easyui-combobox" name="language"
                                required="true"
                                data-options="
                                    panelHeight:'200',
                                    width:'100%',
                                    showClear:true,
                                ">
                                <?php foreach ($language as $abbreviat => $fullName): ?>
                                    <option value="<?=$abbreviat ?>"><?=$fullName ?></option>
                                <?php endforeach ?>
                            </select>
                        </div>
                        <div class="form-input input-group groups col-6">
                            <div class="group-text">下拉多选</div>
                            <select class="group-input easyui-combobox" name="language"
                                required="true"
                                data-options="
                                    multiple:true,
                                    multiline:true,
                                    panelHeight:'200',
                                    showClear:true,
                                ">
                                <?php foreach ($language as $abbreviat => $fullName): ?>
                                    <option value="<?=$abbreviat ?>"><?=$fullName ?></option>
                                <?php endforeach ?>
                            </select>
                        </div>
                    </div>
                </div>
                <fieldset><legend><code>调用远程数据</code></legend></fieldset>
                <div class="form-box sm-form">
                    <div class="form-item row">
                        <div class="form-input input-group groups col-6">
                            <div class="group-text">下拉单选</div>
                            <input class="easyui-combobox" 
                                name="language"
                                required="true"
                                data-options="
                                    url:'/data/index.php?type=select',
                                    method:'get',
                                    valueField:'text',
                                    textField:'desc',
                                    panelHeight:'200',
                                    showClear:true,
                                ">
                        </div>
                        <div class="form-input input-group groups col-6">
                            <div class="group-text">下拉多选</div>
                            <input class="easyui-combobox" 
                                required="true"
                                name="language"
                                data-options="
                                    url:'/data/index.php?type=select',
                                    method:'get',
                                    valueField:'text',
                                    textField:'desc',
                                    multiple:true,
                                    multiline:true,
                                    panelHeight:'200',
                                    showClear:true,
                                ">
                        </div>
                    </div>
                </div>
                <button type="button" class="btn btn-primary btn-block" onclick="$.submitForm(this)">保存</button>
            </form>
        </div>
    </div>
</div>

<?php include_once('../layouts/footer.php') ?>